# # Python Model Option system python vertion
# set(SYS_PYTHON3_VERSION 3.8)
# set(PY_MODEL ON)
# # Save timing data to csv for model training
# set(SAVE_TRAINING_DATA ON)
# # Use external python model
# set(USE_EXTERNAL_MODEL ON)
# # Print timing information to log
# set(TIMING_LOG ON)
# # Use routing
# set(USE_ROUTING ON)


# # DEBUG CTS
# set(DEBUG_ICTS_API ON)
# # DEBUG DATA MANAGER
# set(DEBUG_ICTS_CONFIG ON)
# set(DEBUG_ICTS_DATABASE ON)
# set(DEBUG_ICTS_IO ON)
# set(DEBUG_ICTS_REPORT ON)
# # DEBUG MODEL
# set(DEBUG_ICTS_MODEL ON)
# set(DEBUG_ICTS_MPL_HELPER ON)
# # DEBUG MODULE
# set(DEBUG_ICTS_EVALUATOR ON)
# set(DEBUG_ICTS_ROUTER ON)
# # DEBUG SOLVER
# set(DEBUG_ICTS_BEAT ON)
# set(DEBUG_ICTS_GOCA ON)
# set(DEBUG_ICTS_GOCA_DATABASE ON)
# set(DEBUG_ICTS_BALANCE_CLUSTERING ON)
# set(DEBUG_ICTS_MIN_COST_FLOW ON)
# set(DEBUG_ICTS_ANNEAL_OPT ON)
# set(DEBUG_ICTS_TIMING_PROPAGATOR ON)
# set(DEBUG_ICTS_BST ON)
# set(DEBUG_ICTS_LOCAL_LEGALIZATION ON)
# set(DEBUG_ICTS_TREE_BUILDER ON)
# # DEBUG TEST
# set(DEBUG_ICTS_TEST ON)
# set(DEBUG_ICTS_PYTHON ON)

# Tool definitions
if(PY_MODEL)
  add_compile_definitions(PY_MODEL)
endif()
if(SAVE_TRAINING_DATA)
  add_compile_definitions(SAVE_TRAINING_DATA)
endif()
if(USE_EXTERNAL_MODEL)
  add_compile_definitions(USE_EXTERNAL_MODEL)
endif()
if(TIMING_LOG)
  add_compile_definitions(TIMING_LOG)
endif()
if(USE_ROUTING)
  add_compile_definitions(USE_ROUTING)
endif()

# Debug definitions
if(DEBUG_ICTS_API)
  add_compile_definitions(DEBUG_ICTS_API)
endif()
if(DEBUG_ICTS_CONFIG)
  add_compile_definitions(DEBUG_ICTS_CONFIG)
endif()
if(DEBUG_ICTS_DATABASE)
  add_compile_definitions(DEBUG_ICTS_DATABASE)
endif()
if(DEBUG_ICTS_IO)
  add_compile_definitions(DEBUG_ICTS_IO)
endif()
if(DEBUG_ICTS_REPORT)
  add_compile_definitions(DEBUG_ICTS_REPORT)
endif()
if(DEBUG_ICTS_MODEL)
  add_compile_definitions(DEBUG_ICTS_MODEL)
endif()
if(DEBUG_ICTS_MPL_HELPER)
  add_compile_definitions(DEBUG_ICTS_MPL_HELPER)
endif()
if(DEBUG_ICTS_EVALUATOR)
  add_compile_definitions(DEBUG_ICTS_EVALUATOR)
endif()
if(DEBUG_ICTS_ROUTER)
  add_compile_definitions(DEBUG_ICTS_ROUTER)
endif()
if(DEBUG_ICTS_BEAT)
  add_compile_definitions(DEBUG_ICTS_BEAT)
endif()
if(DEBUG_ICTS_GOCA)
  add_compile_definitions(DEBUG_ICTS_GOCA)
endif()
if(DEBUG_ICTS_GOCA_DATABASE)
  add_compile_definitions(DEBUG_GOCA_ICTS_DATABASE)
endif()
if(DEBUG_ICTS_BALANCE_CLUSTERING)
  add_compile_definitions(DEBUG_ICTS_BALANCE_CLUSTERING)
endif()
if(DEBUG_ICTS_MIN_COST_FLOW)
  add_compile_definitions(DEBUG_ICTS_MIN_COST_FLOW)
endif()
if(DEBUG_ICTS_ANNEAL_OPT)
  add_compile_definitions(DEBUG_ICTS_ANNEAL_OPT)
endif()
if(DEBUG_ICTS_TIMING_PROPAGATOR)
  add_compile_definitions(DEBUG_ICTS_TIMING_PROPAGATOR)
endif()
if(DEBUG_ICTS_BST)
  add_compile_definitions(DEBUG_ICTS_BST)
endif()
if(DEBUG_ICTS_LOCAL_LEGALIZATION)
  add_compile_definitions(DEBUG_ICTS_LOCAL_LEGALIZATION)
endif()
if(DEBUG_ICTS_TREE_BUILDER)
  add_compile_definitions(DEBUG_ICTS_TREE_BUILDER)
endif()
if(DEBUG_ICTS_TEST)
  add_compile_definitions(DEBUG_ICTS_TEST)
endif()

# path setting
set(HOME_ICTS ${HOME_OPERATION}/iCTS)
set(HOME_ISTA ${HOME_OPERATION}/iSTA)
set(HOME_ITO ${HOME_OPERATION}/iTO)

set(ICTS_API ${HOME_ICTS}/api)
set(ICTS_EXTERNAL_LIBS ${HOME_ICTS}/external_libs)
set(ICTS_SOURCE ${HOME_ICTS}/source)
set(ICTS_TEST ${HOME_ICTS}/test)

add_subdirectory(${ICTS_API})
add_subdirectory(${ICTS_EXTERNAL_LIBS})
add_subdirectory(${ICTS_SOURCE})
add_subdirectory(${ICTS_TEST})
